package org.gdpu.model;

/**
 * Created by HEWI2 on 3/12/14.
 */
public enum ApplyState {

    /**
     * 等待对方确认
     */
    WAIT {
        public int getApplyState() {
            return 0;
        }
    },

    /**
     * 申请处理中
     */
    APPLY {
        public int getApplyState() {
            return 1;
        }
    },

    /**
     * 允许申请
     */
    ALLOW {
        public int getApplyState() {
            return 2;
        }
    },

    /**
     * 不允许申请
     */
    NOT_ALLOW {
        public int getApplyState() {
            return 3;
        }
    },

    /**
     * 取消申请
     */
    CANCEL {
        public int getApplyState() {
            return 4;
        }
    },
    /**
     * 对方不同意
     */
    DISAGREE {
        public int getApplyState() {
            return 5;
        }
    };

    public abstract int getApplyState();

    @Override
    public String toString() {
        switch (this) {
            case WAIT:
                return "等待对方确认";
            case APPLY:
                return "申请处理中";
            case ALLOW:
                return "允许申请";
            case NOT_ALLOW:
                return "不允许申请";
            case DISAGREE:
                return "取消申请";
            case CANCEL:
                return "对方不同意";
            default:
                return "Error";
        }
    }
}
